package com.itheima.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.entity.Result;
import com.itheima.service.SetmealService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/setmeal")
public class SetMealController {
    @Reference
    private SetmealService setmealService;
    @RequestMapping("/getAllSetmeal")
    public Result getAllSetmeal() {
        return setmealService.findAll();
    }
    //查询套餐详情
    @RequestMapping("/findById")
    public Result findById(int id) {
        return setmealService.findById(id);
    }
}
